package com.hc.oa.demo.service;

import java.util.Collection;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.bstek.dorado.annotation.DataProvider;
import com.hc.oa.demo.dao.SlCompanyDao;
import com.hc.oa.model.SlCompany;


@Component
public class CompanyService {
	
	@Resource
	private SlCompanyDao slcompanyDao;
	
	@DataProvider
	public Collection<SlCompany> getAllCompany()
	{
		return slcompanyDao.queryAll(SlCompany.class);
	}
	
	@DataProvider
	public SlCompany getCompany()
	{
		List<SlCompany> SlCompanys = slcompanyDao.queryAll(SlCompany.class);
		for(SlCompany Company : SlCompanys )
		{
			return Company;
		}
			return null;
	}
	
}
